import time, functools

def metric(fn):
    @functools.wraps(fn)
    def warpper(*args, **kw):
        start = time.time()
        fn(*args, **kw)
        end = time.time()
        print('%s executed in %s ms' % (fn.__name__, str((end-start)*1000)))
        return fn(*args, **kw)
    return warpper